/**
 * =================================================================
 * 版权所有 2011-2013 深圳市泰海网络科技服务有限公司，并保留所有权利
 * -----------------------------------------------------------------
 * 这不是一个自由软件！您不能在任何未经允许的前提下对程序代码进行修改和使用；
 * 不允许对程序代码以任何形式任何目的的再发布
 * =================================================================
 */
package com.sfpay.api.request;

import java.util.Map;

import com.sfpay.api.ApiRuleException;
import com.sfpay.api.SfpayRequest;
import com.sfpay.api.internal.util.RequestCheckUtils;
import com.sfpay.api.internal.util.SfpayHashMap;
import com.sfpay.api.response.NotifyVerifyResponse;

/**
 * 类说明：<br>
 * 
 * <p>
 * 详细描述：<br>
 * 
 * </p>
 * <pre>
 * ——————————————————————————————————————————————————————————————————
 * |		修改人		|		修改时间			|		修改原因
 * ——————————————————————————————————————————————————————————————————
 * |	354190 曾宪新	|		2013-10-18		|	
 * ——————————————————————————————————————————————————————————————————
 * </pre>
 * 
 * @author 354190 曾宪新(Xavier.zeng)
 * 
 * CreateDate: 2013-10-18
 */
public class NotifyVerifyRequest implements SfpayRequest<NotifyVerifyResponse> {

	private Map<String, String> headerMap = new SfpayHashMap();
	
	private SfpayHashMap udfParams;
	
	private Long timestamp;

	/**
	 * 顺银配送系统分配应用ID
	 */
	private String appKey;

	/** 
	 * 顺银配送系统返回通知ID
	 */
	private String notifyId;
	
	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getNotifyId() {
		return notifyId;
	}

	public void setNotifyId(String notifyId) {
		this.notifyId = notifyId;
	}

	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "sfpay.delivery.notifyVerify";
	}

	public Map<String, String> getTextParams() {		
		SfpayHashMap txtParams = new SfpayHashMap();
		txtParams.put("appKey", this.appKey);
		txtParams.put("notifyId", this.notifyId);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new SfpayHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Class<NotifyVerifyResponse> getResponseClass() {
		return NotifyVerifyResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(appKey, "appKey");
		RequestCheckUtils.checkNotEmpty(notifyId, "notifyId");
	}

	public Map<String, String> getHeaderMap() {
		return headerMap;
	}
}